<UserControl x:Class="Rawr.Rogue.CalculationOptionsPanelRogue"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:local="clr-namespace:Rawr.Rogue"
    mc:Ignorable="d" d:DesignWidth="330" d:DesignHeight="600"
    >
    
    <UserControl.Resources>
        <local:CalculationOptionsRogue x:Key="CalculationOptionsRogueDataSource" d:IsDataSource="True"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource CalculationOptionsRogueDataSource}}">
        <sdk:TabControl>
            <sdk:TabItem Header="Basics">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" Background="AliceBlue" BorderBrush="LightSteelBlue" BorderThickness="1">
                        <TextBlock Margin="4" FontWeight="Bold" Text="Fight Parameters" VerticalAlignment="Center" />
                    </Border>
                    <TextBlock Text="Target is poisonable: " VerticalAlignment="Center" Margin="2" Grid.Row="1" Grid.ColumnSpan="2" />
                    <CheckBox Grid.Column="2" Grid.Row="1" Margin="2" IsChecked="{Binding TargetPoisonable, Mode=TwoWay}" Grid.ColumnSpan="1" VerticalAlignment="Center" />
                    <TextBlock Text="Target is bleeding: " VerticalAlignment="Center" Margin="2" Grid.Row="2" Grid.ColumnSpan="2" />
                    <CheckBox Grid.Column="2" Grid.Row="2" Margin="2" IsChecked="{Binding BleedIsUp, Mode=TwoWay}" Grid.ColumnSpan="1" VerticalAlignment="Center" />
                    <TextBlock Text="Lag Variance: " VerticalAlignment="Center" Margin="2" Grid.Row="3" Grid.ColumnSpan="2" />
                    <inputToolkit:NumericUpDown Margin="2" Grid.Column="2" Grid.Row="3" Value="{Binding LagVariance, Mode=TwoWay}" Maximum="10000" Increment="50" Grid.ColumnSpan="1" />
                    <TextBlock Text="ms " VerticalAlignment="Center" Margin="2" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="1" />

                    <Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4" Background="AliceBlue" BorderBrush="LightSteelBlue" BorderThickness="1">
                        <TextBlock Margin="4" FontWeight="Bold" Text="Misc" VerticalAlignment="Center" />
                    </Border>

                    <TextBlock Margin="2" Text="Trinket Offset: " Grid.Row="5" VerticalAlignment="Center"/>
                    <TextBlock Margin="2" Text="{Binding Path=TrinketOffset, StringFormat=\{0:0 seconds\}}" Grid.Row="5" Grid.Column="3" VerticalAlignment="Center"/>
                    <Slider Margin="2" Value="{Binding Path=TrinketOffset, Mode=TwoWay}" Grid.Row="6" Minimum="0" Maximum="60" Grid.ColumnSpan="4" />
                    <TextBlock Margin="8,2" Grid.Row="7" Grid.ColumnSpan="4" TextWrapping="Wrap" Text="This indicates that you unequip and then reequip one of your trinkets before you begin attacking, in order to desynchronize their proc timers. This is beneficial when you have two trinkets whose procs provide stats which have caps (such as Armor Penetration), so that you can gain the benefit of both a majority of the time."/>
                    
                    <Border Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4" Background="AliceBlue" BorderBrush="LightSteelBlue" BorderThickness="1">
                        <TextBlock Margin="4" FontWeight="Bold" Text="Stat Graph Options" VerticalAlignment="Center" />
                    </Border>
                    
                    <Grid Grid.Row="9" Grid.ColumnSpan="4">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <!-- Stat Graph -->
                        <CheckBox x:Name="CK_Stats_0" Grid.Row="0" Grid.Column="0" Margin="4,2" Content="Strength" IsChecked="{Binding SG_Str, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_1" Grid.Row="1" Grid.Column="0" Margin="4,2" Content="Agility" IsChecked="{Binding SG_Agi, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_2" Grid.Row="2" Grid.Column="0" Margin="4,2" Content="Attack Power" IsChecked="{Binding SG_AP, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_3" Grid.Row="3" Grid.Column="0" Margin="4,2" Content="Crit Rating" IsChecked="{Binding SG_Crit, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_4" Grid.Row="0" Grid.Column="2" Margin="4,2" Content="Hit Rating" IsChecked="{Binding SG_Hit, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_5" Grid.Row="1" Grid.Column="2" Margin="4,2" Content="Expertise Rating" IsChecked="{Binding SG_Exp, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_6" Grid.Row="2" Grid.Column="2" Margin="4,2" Content="Haste Rating" IsChecked="{Binding SG_Haste, Mode=TwoWay}" />
                        <CheckBox x:Name="CK_Stats_7" Grid.Row="3" Grid.Column="2" Margin="4,2" Content="Mastery Rating" IsChecked="{Binding SG_Mstr, Mode=TwoWay}" />
                        <TextBlock Grid.Row="6" Grid.Column="0" Margin="4,2" Text="Rating to Graph:" VerticalAlignment="Center" />
                        <ComboBox x:Name="CB_CalculationToGraph" Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2"  Margin="4,2" SelectedItem="{Binding CalculationToGraph, Mode=TwoWay}" SelectionChanged="CB_CalculationToGraph_SelectionChanged">
                            <System:String>Overall Rating</System:String>
                            <System:String>DPS Rating</System:String>
                            <System:String>Survivability Rating</System:String>
                        </ComboBox>
                        <TextBlock Grid.Row="8" Grid.Column="0" Margin="4,2" Text="Increment:" />
                        <inputToolkit:NumericUpDown Grid.Row="8" Grid.Column="1" Margin="4,2" Height="20" Value="{Binding StatsIncrement, Mode=TwoWay}" Maximum="5000" />
                        <Button Grid.Row="8" Grid.Column="2" Grid.ColumnSpan="1" Margin="4,2" Content="Display Stat Graph" Click="BT_StatsGraph_Click" />
                    </Grid>
                </Grid>
            </sdk:TabItem>
            <sdk:TabItem Header="Rotation">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Border Grid.Column="0" Grid.ColumnSpan="4" Background="AliceBlue" BorderBrush="LightSteelBlue" BorderThickness="1">
                        <TextBlock Margin="4" FontWeight="Bold" Text="Custom Rotation" VerticalAlignment="Center" />
                    </Border>
                    <TextBlock Text="Don't optimize rotation: " VerticalAlignment="Center" Margin="2" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" />
                    <CheckBox Grid.Column="2" Grid.Row="1" Margin="2" IsChecked="{Binding ForceCustom, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <TextBlock Text="Combo Point Generator: " VerticalAlignment="Center" Margin="2" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" />
                    <ComboBox Margin="2" Grid.Column="2" Grid.Row="2" SelectedIndex="{Binding CustomCPG, Mode=TwoWay}" Grid.ColumnSpan="2">
                        <ComboBoxItem Content="Mutilate"/>
                        <ComboBoxItem Content="Sinister Strike"/>
                        <ComboBoxItem Content="Backstab"/>
                        <ComboBoxItem Content="Hemorrhage"/>
                    </ComboBox>
                    <TextBlock Text="Slice and Dice CP: " VerticalAlignment="Center" Margin="2" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" />
                    <ComboBox Margin="2" Grid.Column="2" Grid.Row="3" SelectedItem="{Binding CustomCPSnD, Mode=TwoWay}" Grid.ColumnSpan="2">
                        <System:Int32>1</System:Int32>
                        <System:Int32>2</System:Int32>
                        <System:Int32>3</System:Int32>
                        <System:Int32>4</System:Int32>
                        <System:Int32>5</System:Int32>
                    </ComboBox>
                    <TextBlock Text="Finisher (and CP Usage): " VerticalAlignment="Center" Margin="2" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" />
                    <ComboBox Margin="2" Grid.Column="2" Grid.Row="4" SelectedIndex="{Binding CustomFinisher, Mode=TwoWay, NotifyOnValidationError=True, BindsDirectlyToSource=True}" Grid.ColumnSpan="1">
                        <ComboBoxItem Content="None"/>
                        <ComboBoxItem Content="Eviscerate"/>
                        <ComboBoxItem Content="Envenom"/>
                    </ComboBox>
                    <ComboBox Margin="2" Grid.Column="3" Grid.Row="4" SelectedItem="{Binding CustomCPFinisher, Mode=TwoWay}" Grid.ColumnSpan="1">
                        <System:Int32>1</System:Int32>
                        <System:Int32>2</System:Int32>
                        <System:Int32>3</System:Int32>
                        <System:Int32>4</System:Int32>
                        <System:Int32>5</System:Int32>
                    </ComboBox>
                    <TextBlock Text="Poisons (MH/OH): " VerticalAlignment="Center" Margin="2" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" />
                    <ComboBox Margin="2" Grid.Column="2" Grid.Row="5" SelectedIndex="{Binding CustomMHPoison, Mode=TwoWay}" Grid.ColumnSpan="1">
                        <ComboBoxItem Content="None/Other"/>
                        <ComboBoxItem Content="Instant"/>
                        <ComboBoxItem Content="Deadly"/>
                        <ComboBoxItem Content="Wound"/>
                    </ComboBox>
                    <ComboBox Margin="2" Grid.Column="3" Grid.Row="5" SelectedIndex="{Binding CustomOHPoison, Mode=TwoWay}" Grid.ColumnSpan="1">
                        <ComboBoxItem Content="None/Other"/>
                        <ComboBoxItem Content="Instant"/>
                        <ComboBoxItem Content="Deadly"/>
                        <ComboBoxItem Content="Wound"/>
                    </ComboBox>
                    <CheckBox Grid.Column="0" Grid.Row="6" Margin="2" IsChecked="{Binding CustomUseRupt, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" Content="Use Rupture"/>
                    <CheckBox Grid.Column="0" Grid.Row="7" Margin="2" IsChecked="{Binding CustomUseTotT, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" Content="Use Tricks of the Trade"/>
                    <CheckBox Grid.Column="0" Grid.Row="8" Margin="2" IsChecked="{Binding CustomUseExpose, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" Content="Use Expose Armor"/>
                    <CheckBox Grid.Column="2" Grid.Row="6" Margin="2" IsChecked="{Binding CustomUseRS, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" Content="Use Revealing Strike"/>
                    <CheckBox Grid.Column="2" Grid.Row="7" Margin="2" IsChecked="{Binding CustomUseRecup, Mode=TwoWay}" Grid.ColumnSpan="2" VerticalAlignment="Center" Content="Use Recuperate"/>

                    <Border Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="4" Background="AliceBlue" BorderBrush="LightSteelBlue" BorderThickness="1">
                        <TextBlock Margin="4" FontWeight="Bold" Text="Rotation Optimizer" VerticalAlignment="Center" />
                    </Border>

                    <TextBlock Text="You can turn off abilities that you don't want to be considered by the optimizer, this will speed up optimizing considerably." VerticalAlignment="Center" Margin="2" Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="4" TextWrapping="Wrap" />
                    <CheckBox Grid.Column="0" Grid.Row="11" Margin="2" IsChecked="{Binding EnableMuti, Mode=TwoWay}" Content="Mutilate" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="0" Grid.Row="12" Margin="2" IsChecked="{Binding EnableSS, Mode=TwoWay}" Content="Sinister Strike" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="0" Grid.Row="13" Margin="2" IsChecked="{Binding EnableBS, Mode=TwoWay}" Content="Backstab" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="0" Grid.Row="14" Margin="2" IsChecked="{Binding EnableHemo, Mode=TwoWay}" Content="Hemorrhage" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="0" Grid.Row="15" Margin="2" IsChecked="{Binding EnableRS, Mode=TwoWay}" Content="Revealing Strike" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="0" Grid.Row="16" Margin="2" IsChecked="{Binding EnableRupt, Mode=TwoWay}" Content="Rupture" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="11" Margin="2" IsChecked="{Binding EnableEvis, Mode=TwoWay}" Content="Eviscerate" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="12" Margin="2" IsChecked="{Binding EnableEnvenom, Mode=TwoWay}" Content="Envenom" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="13" Margin="2" IsChecked="{Binding EnableRecup, Mode=TwoWay}" Content="Recuperate" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="14" Margin="2" IsChecked="{Binding EnableIP, Mode=TwoWay}" Content="Instant Poison" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="15" Margin="2" IsChecked="{Binding EnableDP, Mode=TwoWay}" Content="Deadly Poison" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                    <CheckBox Grid.Column="2" Grid.Row="16" Margin="2" IsChecked="{Binding EnableWP, Mode=TwoWay}" Content="Wound Poison" Grid.ColumnSpan="2" VerticalAlignment="Center" />
                </Grid>
            </sdk:TabItem>
        </sdk:TabControl>
    </Grid>
</UserControl>
